package com.metaera.app.controller.view;

import com.metaera.app.controller.view.core.INetworkRequestView;
import com.metaera.app.data.model.HotSearchResponse;
import com.metaera.app.ui.adapters.SearchHotAdapter;

import java.util.List;

import androidx.recyclerview.widget.RecyclerView;

public class SearchHotListView implements INetworkRequestView<List<HotSearchResponse>> {

    private RecyclerView mRecyclerView;

    public SearchHotListView(RecyclerView recyclerView) {
        mRecyclerView = recyclerView;
    }

    @Override
    public void successful(List<HotSearchResponse> data) {
        SearchHotAdapter adapter = new SearchHotAdapter();
        adapter.setList(data);
        mRecyclerView.setAdapter(adapter);
    }

    @Override
    public void loading() {

    }

    @Override
    public void failure(Throwable throwable) {

    }

}
